﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DesignStartExamView.aspx.cs" Inherits="Skynet.WebSite.Administration.DesignStartExamView" %>
<%@ Register assembly="Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet" namespace="Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet" tagprefix="cc1" %>
<%@ Register Assembly="Infrastructure.Web" Namespace="Infrastructure.Web.Controls" TagPrefix="infgrid"   %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    .style2
    {
        height: 71px;
    }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AjaxContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <table class="style1">
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <h1>
                    Exam Details
                 </h1>
           </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Category</td>
            <td>
                <asp:DropDownList ID="ddlCategory" runat="server" DataTextField="Title" DataValueField="Id">
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Title</td>
            <td>
                <asp:TextBox ID="txtTitle" runat="server" Height="32px" TextMode="MultiLine" 
                    Width="615px"></asp:TextBox>
            </td>
            <td>
                <cc1:PropertyProxyValidator ID="PropertyProxyValidator1" runat="server" 
                    ControlToValidate="txtTitle" 
                    DisplayMode="List" PropertyName="Title" 
                    SourceTypeName="Skynet.BusinessEntities.Exam" 
                    RulesetName="DefaultResultSet" SetFocusOnError="True">
                    *</cc1:PropertyProxyValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Summary</td>
            <td class="style2">
                <asp:TextBox ID="txtSummary" runat="server" Height="63px" TextMode="MultiLine" 
                    Width="615px"></asp:TextBox>
            </td>
            <td class="style2">
                <cc1:PropertyProxyValidator ID="PropertyProxyValidator2" runat="server" 
                    ControlToValidate="txtSummary" 
                    DisplayMode="List" PropertyName="Summary" 
                    SourceTypeName="Skynet.BusinessEntities.Exam" 
                    RulesetName="DefaultResultSet" SetFocusOnError="True">
                    *</cc1:PropertyProxyValidator>
            </td>
        </tr>
        <tr>
            <td>
                <asp:LinkButton ID="lbBackExams" runat="server" onclick="lbBackExams_Click">Back Exams</asp:LinkButton>
            </td>
            <td>
                <asp:LinkButton ID="lbGenerateQuestion" runat="server" 
                    onclick="lbGenerateQuestion_Click">New Question</asp:LinkButton>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:GridView ID="gvQuestions" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="odsQuestions" DataKeyNames="Id"  Width="100%"
                    onselectedindexchanged="GridView1_SelectedIndexChanged">
                    <Columns>
                        <asp:CommandField ShowSelectButton="True" />
                        <asp:CommandField ShowDeleteButton="True" />
                        <infgrid:DynamicBoundField DataField="Category" HeaderText="Category"></infgrid:DynamicBoundField>
                        <infgrid:DynamicBoundField DataField="Question" HeaderText="Question"></infgrid:DynamicBoundField>                        
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="odsQuestions" runat="server" 
                    OldValuesParameterFormatString="original_{0}" SelectMethod="GetQuestions" 
                    
                    TypeName="Skynet.WebAdministracion.Views.DesignStartExam.DesignStartExamPresenter" 
                    ondeleted="odsQuestions_Deleted">
                </asp:ObjectDataSource>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                    ShowMessageBox="True" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
